using System;
using System.Collections.Generic;
using System.Linq;

using MonoTouch.Foundation;
using MonoTouch.UIKit;
using MonoTouch.Dialog;

namespace Socialite
{
	public partial class PromotersScreen : DialogViewController
	{
		List<Promoter> _promoters;

		public PromotersScreen (Place place) : base (UITableViewStyle.Grouped, null, true)
		{
			Root = new RootElement (place.Name);
			Root.UnevenRows = true;

			VariableHeightStyledStringElement eventElement = new VariableHeightStyledStringElement (
				place.EventName
			);
			eventElement.Font = UIFont.FromName (FontName.HelveticaBold, (float)FontSize.ClubEventHeader1);
			eventElement.Alignment = UITextAlignment.Center;

			_promoters = new List<Promoter> ();
			_promoters.Add (new Promoter ("Joey Chan", 26, Ethnicity.Asian, "ISIS Productions"));
			_promoters.Add (new Promoter ("Chris Angel", 26, Ethnicity.Black, "Green-T Enterprises"));
			_promoters.Add (new Promoter ("Nebiyu Elias", 26, Ethnicity.Black, "ISIS Productions"));
			_promoters.Add (new Promoter ("Dat Mai", 26, Ethnicity.Black, "617 Productions"));
			_promoters.Add (new Promoter ("Monica Yang", 26, Ethnicity.Asian, "ISIS Productions"));
			_promoters.Add (new Promoter ("Wanty Phu", 26, Ethnicity.Black, "ISIS Productions"));


			Section section = new Section ();
			section.Add (eventElement);

			foreach (Promoter promoter in _promoters) {
				section.Add (new PromoterElement(promoter));
			}

			Root.Add(section);
		}
	}

}
